<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Computes a digest</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-dh-compute-key.html">openssl_dh_compute_key</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-encrypt.html">openssl_encrypt</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.openssl-digest" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_digest</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0)</p><p class="refpurpose"><span class="refname">openssl_digest</span> &mdash; <span class="dc-title">Computes a digest</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-digest-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>openssl_digest</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$method</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$raw_output</code><span class="initializer"> = false</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Computes a digest hash value for the given data using a given method,
   and returns a raw or binhex encoded string.
  </p>

  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">本函数还未编写文档，仅有参数列表。</p></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-digest-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">data</code></em></dt>

     <dd>

      <p class="para">
       The data.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">method</code></em></dt>

     <dd>

      <p class="para">
       The digest method.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">raw_output</code></em></dt>

     <dd>

      <p class="para">
       Setting to <strong><code>TRUE</code></strong> will return as raw output data, otherwise the return
       value is binhex encoded.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-digest-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the digested hash value on success 或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.openssl-digest-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   Emits an <strong><code>E_WARNING</code></strong> level error if an unknown signature algorithm
   is passed via the <em><code class="parameter">method</code></em> parameter.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.openssl-digest-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.openssl-get-cipher-methods.html" class="function" rel="rdfs-seeAlso">openssl_get_cipher_methods()</a> - Gets available cipher methods</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-dh-compute-key.html">openssl_dh_compute_key</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-encrypt.html">openssl_encrypt</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
